import { Component, useEffect, useRef } from 'react'


class VirtualDOM extends Component{
    render() {
        return (<div>This is VirtualDOM</div>)
    }
}

export function UseRefDemo() {
    const VD = useRef(null)
    const RD = useRef(null)

    useEffect(()=> {
       console.log('VD', VD.current); 
       console.log('RD', RD.current);
    },[])
    
    
    return (
        <div>
            <VirtualDOM ref={VD}/>
            <h1 ref={RD}>This is Real DOM</h1>
        </div>
    )
}